/*******************************************************************************
 * Copyright (c) 2007 TOPCASED. All rights reserved. This program
 * and the accompanying materials are made available under the terms of the
 * Eclipse Public License v1.0 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors: Topcased contributors and others - initial API and implementation
*******************************************************************************/

package fr.insatoulouse.uvmanager.grb.uvmanager;

/**
 * 
 * @author
 */
public class UV  {

    //Attributes
    private String name;
    private String description;
    private Integer CM;
    private Integer TP;
    private Integer TD;
    private Integer BE;
    private Integer controle;
    private String inCharge;
    private Integer id;
    private UVStatus status;
    private Integer year;
    
    public UV(){
    }

    //Start of user code for the default constructor
    /**
     * Default constructor
     */
    public UV (String name,String desc,int CM,int TD, int TP,int BE,int controle,String inCharge,int id,String validated,int year){
        //Attributes
        this.name = name;
        this.description = desc;
        this.CM = CM;
        this.TP = TP;
        this.TD = TD;
        this.BE = BE;
        this.controle = controle;
        this.inCharge = inCharge;
        this.id = id;
        this.status = UVStatus.valueOf(validated);
        this.year = year;
    }
    //End of user code for the default constructor

    //Accessors

    /**
     * Return name
     * @return String
     */	
    public String getName(){
        return this.name;
    }	

    /**
     * Set the value of name.
     * @param myname 
     */
    public void setName(String myname){
        this.name = myname;
    }	

    /**
     * Return description
     * @return String
     */	
    public String getDescription(){
        return this.description;
    }	

    /**
     * Set the value of description.
     * @param mydescription 
     */
    public void setDescription(String mydescription){
        this.description = mydescription;
    }	

    /**
     * Return CM
     * @return int
     */	
    public int getCM(){
        return this.CM;
    }	

    /**
     * Set the value of CM.
     * @param myCM 
     */
    public void setCM(int myCM){
        this.CM = myCM;
    }	

    /**
     * Return TP
     * @return int
     */	
    public int getTP(){
        return this.TP;
    }	

    /**
     * Set the value of TP.
     * @param myTP 
     */
    public void setTP(int myTP){
        this.TP = myTP;
    }	

    /**
     * Return TD
     * @return int
     */	
    public int getTD(){
        return this.TD;
    }	

    /**
     * Set the value of TD.
     * @param myTD 
     */
    public void setTD(int myTD){
        this.TD = myTD;
    }	

    /**
     * Return BE
     * @return int
     */	
    public int getBE(){
        return this.BE;
    }	

    /**
     * Set the value of BE.
     * @param myBE 
     */
    public void setBE(int myBE){
        this.BE = myBE;
    }	

    /**
     * Return controle
     * @return int
     */	
    public int getControle(){
        return this.controle;
    }	

    /**
     * Set the value of controle.
     * @param mycontrole 
     */
    public void setControle(int mycontrole){
        this.controle = mycontrole;
    }	

    /**
     * Return inCharge
     * @return String
     */	
    public String getInCharge(){
        return this.inCharge;
    }	

    /**
     * Set the value of inCharge.
     * @param myinCharge 
     */
    public void setInCharge(String myinCharge){
        this.inCharge = myinCharge;
    }	

    /**
     * Return id
     * @return int
     */	
    public int getId(){
        return this.id;
    }	

    /**
     * Set the value of id.
     * @param myid 
     */
    public void setId(int myid){
        this.id = myid;
    }	


    /**
     * Return year
     * @return int
     */	
    public int getYear(){
        return this.year;
    }	

    /**
     * Set the value of year.
     * @param myyear 
     */
    public void setYear(int myyear){
        this.year = myyear;
    }

	public void setId(Integer id) {
		this.id = id;
	}	


	public String toString() {
		StringBuffer res = new StringBuffer();
		res.append("ID: " + this.id);
		res.append(" - ");
		res.append(this.name);
		res.append("\n");
		res.append("In Charge: ");
		res.append(this.inCharge);
		res.append("\n");		
		res.append(this.description);
		res.append("\n");
		res.append("CM: ");
		res.append(this.CM);
		res.append("\t");
		res.append("TP: ");
		res.append(this.TP);
		res.append("\t");
		res.append("TD: ");
		res.append(this.TD);
		res.append("\t");
		res.append("BE: ");
		res.append(this.BE);
		res.append("\t");
		res.append("Controle: ");
		res.append(this.controle);		
		res.append("\n");
		res.append("Status: ");
		res.append(this.status);
		res.append("\n");
		return res.toString();
	}

	public UVStatus getStatus() {
		return status;
	}

	public void setStatus(UVStatus status) {
		this.status = status;
	}


    //Start of user code for main	
    /*public static void main (String[] args) {	
    }
    */
    //End of user code
	
}
